Optimal. Leaf size=95 \[ \frac {(a D+b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}-\frac {A \log \left (a+b x^2\right )}{2 a^2}+\frac {A \log (x)}{a^2}+\frac {x (b B-a D)-a C+A b}{2 a b \left (a+b x^2\right )} \]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {1805, 801, 635, 205, 260} \begin {gather*} -\frac {A \log \left (a+b x^2\right )}{2 a^2}+\frac {A \log (x)}{a^2}+\frac {(a D+b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}+\frac {x (b B-a D)-a C+A b}{2 a b \left (a+b x^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 260
Rule 635
Rule 801
Rule 1805
Rubi steps
\begin {align*} \int \frac {A+B x+C x^2+D x^3}{x \left (a+b x^2\right )^2} \, dx &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}-\frac {\int \frac {-2 A-\frac {(b B+a D) x}{b}}{x \left (a+b x^2\right )} \, dx}{2 a}\\ &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}-\frac {\int \left (-\frac {2 A}{a x}+\frac {-a b B-a^2 D+2 A b^2 x}{a b \left (a+b x^2\right )}\right ) \, dx}{2 a}\\ &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}+\frac {A \log (x)}{a^2}-\frac {\int \frac {-a b B-a^2 D+2 A b^2 x}{a+b x^2} \, dx}{2 a^2 b}\\ &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}+\frac {A \log (x)}{a^2}-\frac {(A b) \int \frac {x}{a+b x^2} \, dx}{a^2}+\frac {(b B+a D) \int \frac {1}{a+b x^2} \, dx}{2 a b}\\ &=\frac {A b-a C+(b B-a D) x}{2 a b \left (a+b x^2\right )}+\frac {(b B+a D) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{3/2}}+\frac {A \log (x)}{a^2}-\frac {A \log \left (a+b x^2\right )}{2 a^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 85, normalized size = 0.89 \begin {gather*} \frac {\frac {a (-a (C+D x)+A b+b B x)}{b \left (a+b x^2\right )}-A \log \left (a+b x^2\right )+\frac {\sqrt {a} (a D+b B) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{b^{3/2}}+2 A \log (x)}{2 a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x+C x^2+D x^3}{x \left (a+b x^2\right )^2} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.87, size = 296, normalized size = 3.12 \begin {gather*} \left [-\frac {2 \, C a^{2} b - 2 \, A a b^{2} + {\left (D a^{2} + B a b + {\left (D a b + B b^{2}\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 2 \, {\left (D a^{2} b - B a b^{2}\right )} x + 2 \, {\left (A b^{3} x^{2} + A a b^{2}\right )} \log \left (b x^{2} + a\right ) - 4 \, {\left (A b^{3} x^{2} + A a b^{2}\right )} \log \relax (x)}{4 \, {\left (a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}}, -\frac {C a^{2} b - A a b^{2} - {\left (D a^{2} + B a b + {\left (D a b + B b^{2}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + {\left (D a^{2} b - B a b^{2}\right )} x + {\left (A b^{3} x^{2} + A a b^{2}\right )} \log \left (b x^{2} + a\right ) - 2 \, {\left (A b^{3} x^{2} + A a b^{2}\right )} \log \relax (x)}{2 \, {\left (a^{2} b^{3} x^{2} + a^{3} b^{2}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.35, size = 93, normalized size = 0.98 \begin {gather*} -\frac {A \log \left (b x^{2} + a\right )}{2 \, a^{2}} + \frac {A \log \left ({\left | x \right |}\right )}{a^{2}} + \frac {{\left (D a + B b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b} - \frac {C a^{2} - A a b + {\left (D a^{2} - B a b\right )} x}{2 \, {\left (b x^{2} + a\right )} a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 125, normalized size = 1.32 \begin {gather*} \frac {B x}{2 \left (b \,x^{2}+a \right ) a}+\frac {B \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, a}-\frac {D x}{2 \left (b \,x^{2}+a \right ) b}+\frac {D \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \sqrt {a b}\, b}+\frac {A}{2 \left (b \,x^{2}+a \right ) a}+\frac {A \ln \relax (x )}{a^{2}}-\frac {A \ln \left (b \,x^{2}+a \right )}{2 a^{2}}-\frac {C}{2 \left (b \,x^{2}+a \right ) b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 2.91, size = 87, normalized size = 0.92 \begin {gather*} -\frac {C a - A b + {\left (D a - B b\right )} x}{2 \, {\left (a b^{2} x^{2} + a^{2} b\right )}} - \frac {A \log \left (b x^{2} + a\right )}{2 \, a^{2}} + \frac {A \log \relax (x)}{a^{2}} + \frac {{\left (D a + B b\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+B\,x+C\,x^2+x^3\,D}{x\,{\left (b\,x^2+a\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________